High Efficiency Video Coding (HEVC) is a new coding standard that has been developed in recent years. In the High Efficiency Video Coding (HEVC) system, the fixed-size macroblock of H.264/AVC is replaced by a flexible block, named coding unit (CU). Pixels in the CU share the same coding parameters to improve coding efficiency. A CU may begin with a largest CU (LCU), which is also referred as coded tree unit (CTU) in HEVC. In addition to the concept of coding unit, the concept of prediction unit (PU) is also introduced in HEVC. Once the splitting of CU hierarchical tree is done, each leaf CU is further split into one or more prediction units (PUs) according to prediction type and PU partition.
Along with the High Efficiency Video Coding (HEVC) standard development, the development of extensions of HEVC has also started. The HEVC extensions include range extensions (RExt) which target at non-4:2:0 color formats, such as 4:2:2 and 4:4:4, and higher bit-depths video such as 12, 14 and 16 bits per sample. One of the likely applications utilizing RExt is screen sharing, over wired- or wireless-connection. Due to specific characteristics of screen contents, coding tools have been developed and demonstrate significant gains in coding efficiency. Among them, the palette coding (a.k.a. major color based coding) techniques represent block of pixels using indices to the palette (major colors), and encode the palette and the indices by exploiting spatial redundancy. While the total number of possible color combinations is huge, the number of colors in an area of picture is usually very limited for typical screen contents. Therefore, the palette coding becomes very effective for screen content materials.
During the early development of HEVC range extensions (RExt), several proposals have been disclosed to address palette-based coding. For example, a palette prediction and sharing technique is disclosed in JCTVC-N0247 (Guo et al., “RCE3: Results of Test 3.1 on Palette Mode for Screen Content Coding”, Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 14th Meeting: Vienna, AT, 25 Jul.-2 Aug. 2013 Document: JCTVC-N0247). In JCTVC-N0247, the palette of each color component is constructed and transmitted. The palette can be predicted (or shared) from its left neighboring CU to reduce the bitrate. All pixels within the given block are then coded using their palette indices.
A second version of their palette coding technique has also been disclosed by Guo et al., in JCTVC-N0249 (Guo et al., “Non-RCE3: Modified Palette Mode for Screen Content Coding”, Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 14th Meeting: Vienna, AT, 25 Jul.-2 Aug. 2013 Document: JCTVC-N0249), where each element in the palette is a triplet representing a specific combination of the three color components. The palette index is shared by all color components to reduce overhead.
The palette coding procedure disclosed in JCTVC-N0249 is described as follows.                Scan the CU in horizontal scan order (or so called raster scan order). The scan runs in the horizontal direction for each line from top line to bottom line, as shown in FIG. 1.        Signal palette index using one of the following 2 modes:                    Run mode: signal “palette_index” followed by “run”            In “run mode”, a palette index is first signaled followed by “palette_run” (e.g., M). No further information needs to be transmitted for the current position and the following M positions as they have the same palette index as signaled.            Copy top mode: Signal a “copy run”            In “copy above mode”, a value “copy_run” (e.g., N) is transmitted to indicate that for the following N positions (including the current one), the palette index is equal to the palette index of the one that is at the same location in the row above.                        
Another major color-base coding (palette coding) method is disclosed by Guo et al. in JCTVC-O0182 (Guo et al., “AHG8: Major-color-based screen content coding”, Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 15th Meeting: Geneva, CH, 23 Oct.-1 Nov. 2013, Document: JCTVC-O0182). According to JCTVC-O0182, the palette of each component are constructed and transmitted. However, the coding of the palette index is different from that in JCTVC-N0247. The following describes the procedure to code the palette indices according to JCTVC-O0182.                Scan the CU in horizontal scan order (or so called raster scan order). The scan runs in the horizontal direction for each line from top line to bottom line, as shown in FIG. 1.        Signal one line of palette index using one of the following 3 modes:                    horizontal mode            In horizontal mode, all the pixels in the same line have the same value. If the value is the same as the first pixel of the above pixel line, only line mode signalling bits are transmitted. Otherwise, the index value is also transmitted.            vertical mode            In vertical mode, the current pixel line is the same as the above pixel line. Therefore, only line mode signaling bits are transmitted.            normal mode            In normal mode, pixels in a line are predicted individually. For each pixel, the left or above neighbors is used as predictor, and the prediction symbol is transmitted to the decoder.                        
It is desirable to develop methods for further improving the coding efficiency and/or reducing the complexity associated with the palette coding.